import Navigation from '@nav';
import FooterNav from '@footer';
import { Component, Vue } from 'vue-property-decorator'

@Component({
    components: {
        Navigation, FooterNav
    }
})
export class App extends Vue {

    /**
     * 是否需要显示导航栏、页脚
     */
    private showFooter(): Boolean {
        return this.$route.path != '/login';
    }

    created() {
        let that = this;
        setTimeout(() => {
            let noLogin: Boolean = that.$route.path.requireLess();
            if (!noLogin && that.$store.getters.me() == undefined) {
                that.$router.replace('/login');
            }
        }, 500);
    }
}